1. Field of the Invention
The present invention relates to a decoding apparatus and decoding method. The present invention particularly relates to speedup of entropy coding/decoding processing as a compression scheme used to encode a moving image or still image. The present invention is particularly suitable for arithmetic decoding processing as an entropy decoding method.
2. Description of the Related Art
Recently, the H.264 (ITU-T Rec.H.264|ISO/IEC 14496-10 AVC) coding scheme has been standardized in joint video team (JVT). The H.264 handles image information as digital data, like JPEG known as a still image coding scheme and MPEG-2 or MPEG-4 (version 2) known as a moving image coding scheme. Especially in the moving image coding scheme, compression using hybrid coding is executed to reduce redundant information between frames (in the temporal direction) and redundant information of pixels in a frame (in the spatial direction), aiming at efficient information transmission and storage. This hybrid coding uses entropy coding together with orthogonal transform such as discrete cosine transform and motion-compensation. Entropy coding is a technique of executing variable length coding using uneven distribution of information.
As entropy coding used in the H.264, Context-based Adaptive Variable Length Coding (CAVLC) using Huffman coding or Context-Adaptive Binary Arithmetic Coding (CABAC) using arithmetic coding is defined in accordance with the profile. CAVLC is selected in a baseline profile which includes coding tools with low process complexity for a communication application. CABAC is selected in a main profile or high profile that places focus on the coding efficiency.
Generally, a technical difficulty in speeding up arithmetic coding such as CABAC is final symbol determination. FIG. 10 is a flowchart of CABAC decoding processing described in, for example, the H.264 recommendation (ITU-T Rec.H.264|ISO/IEC 14496-10 AVC). A detailed description of the flowchart in FIG. 10 will be omitted. In step S204, Binarization(SE) to binarize a syntax element SE is activated. This process is executed for comparison with binary data in final symbol determination in step S209.
In the processing shown in FIG. 10, arithmetic decoding processing is executed in step S208. In step S208, DecodeBin(ctxIdx) as arithmetic decoding processing is executed to obtain symbol data. In step S209, it is determined whether the symbol data obtained in step S208 exists in the binary data obtained by the binarization in step S204, thereby determining whether the symbol data is the final symbol of the syntax element SE. More specifically, in step S209, it is determined whether the result of DecodeBin(ctxIdx) decoded for every symbol exists in an enormous number of combinations of symbols obtained by binarizing all values that the syntax element SE as the decoding target can take in advance. It is then determined based on the determination result whether the symbol data is the final symbol of the syntax element SE.
However, it is obviously technically difficult to implement the processing flow by software or hardware.
FIG. 11 shows the decoding program of CABAC processing of coef_abs_level_minus1 implemented in Joint Model that is known as H.264 Reference Software. FIG. 12 shows a result of binarization by concatenated unary/kth order exp-Golomb coding in coef_abs_level_minus1. As is apparent from FIG. 12, when the final symbol of the binarized symbol data string has a value of 14 or less, unary coding is applied, and the data string always ends with 0. When the value is larger than 14, Golomb coding is applied, and the data string includes a prefix and a suffix with a value “0” placed at the boundary between them. As is apparent from FIG. 11, in Joint Model, the final symbol is determined by using the symbol appearance characteristic of concatenated unary/kth order exp-Golomb coding.
FIG. 13 is a block diagram showing the hardware configuration of CABAC processing using the Joint Model technology. FIG. 14 shows arithmetic decoding processing executed by an arithmetic decoding unit 501 disclosed in “H.264 Reference Software Joint Model ver9.0”. FIG. 15 shows re-normalization processing executed by a re-normalization unit 502. Note that DecodeBin(ctxIdx) includes DecodeDecision(ctxIdx) as arithmetic coding and DecodeBypass (not shown) as fixed length encoding. The simple DecodeBypass processing is omitted here.
Along with the recent rapid increase in the resolution represented by high-resolution images, a demand for coding and decoding apparatuses capable of high-speed processing has arisen. In hybrid coding represented by H.264, in particular, a factor that determines the processing speed of an entire decoding apparatus is speedup of an entropy decoding apparatus.
However, it is technically difficult to implement the decoding processing (FIG. 10) in the above-described “ITU-T Rec.H.264|ISO/IEC 14496-10 AVC”. When the decoding processing described in “H.264 Reference Software Joint Model ver9.0” is implemented by hardware, a feedback loop containing an enormous number of logics via a context memory 503 are present. Additionally, a symbol is input to a final symbol determination unit 504 after all processes shown in FIGS. 14 and 15 finish. It is therefore difficult to implement hardware for decoding one symbol in one cycle.